package com.leigq.www.server.controller;

import com.leigq.www.server.properties.Teacher1Properties;
import com.leigq.www.server.properties.TeacherProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Nacos配置控制层
 *
 * @author leiguoqing
 * @date 2022年10月16日 13:47:00
 */
@RestController
@RequestMapping("/nacos/config")
public class NacosConfigController {

    @Autowired
    private TeacherProperties teacherProperties;

    @Autowired
    private Teacher1Properties teacher1Properties;

    /**
     * Test string.
     *
     * @return the string
     */
    @GetMapping("/test/nacosValue")
    public String test1() {
        return teacherProperties.toString();
    }

    /**
     * Test string.
     *
     * @return the string
     */
    @GetMapping("/test/nacosConfigurationProperties")
    public String test2() {
        return teacher1Properties.toString();
    }

}
